package excellentQuizComment

import org.springframework.cloud.contract.spec.Contract

Contract.make {
    request {
        method 'POST'
        url "api//myStudents/concealComment"
        body([
                studentId   : 5,
                programId   : 1,
                content     : 'test content'
        ])
        bodyMatchers {
            jsonPath('$.studentId',byRegex(number()))
            jsonPath('$.programId',byRegex(number()))
            jsonPath('$.content',byRegex(nonEmpty()))
        }
        headers {
            contentType(applicationJsonUtf8())
            header(id: 1)
            header(userName: 'acey')
        }
    }
    response {
        status 201
    }
}
